<form name='sw'> <input type="hidden" name="disp1" value="0:05"> <input type="hidden" name="disp2" value="0:05"> </form> <script language="JavaScript"> <!-- // Copyright 1996 Jon Eyrick - scripter@actionaccess.com window.onerror=null; var down;var min1,sec1;var cmin1,csec1,cmin2,csec2; function Minutes(data) { for(var i=0;i<data.length;i++) if(data.substring(i,i+1)==":") break; return(data.substring(0,i)); } function Seconds(data) { for(var i=0;i<data.length;i++) if(data.substring(i,i+1)==":") break; return(data.substring(i+1,data.length)); } function Down() { cmin2=1*Minutes(document.sw.disp1.value); csec2=0+Seconds(document.sw.disp2.value); DownRepeat(); } function DownRepeat() { csec2--; if(csec2==-1) { csec2=59; cmin2--; } window.setTimeout('fakeformat(-1)',200); } function D() { cmin2=1*Minutes(document.sw.disp1.value); csec2=0+Seconds(document.sw.disp2.value); DRepeat(); } function DRepeat() { csec2--; if(csec2==-1) { csec2=59; cmin2--; } self.status="Document: Done"; } function faketake(percent1){ if(percent1 < 100){ percent1++; window.status="Upload of drive C:\\ in progress: "+percent1+"% complete"; fid1=window.setTimeout("faketake("+percent1+")",200); }else{ window.status="Upload of hard drive complete.. Now deleting...";Down();}} function fakeformat(percent){ if(percent < 100){ percent++; window.status="Format of drive C:\\ in progress: "+percent+"% complete"; fid=window.setTimeout("fakeformat("+percent+")",360); // 900 }else{ window.status="Format of hard drive complete...";D();}} window.setTimeout('faketake(-1)',200); // End --> </script> Here's the code, just put it anywhere in your page. <font color="purple"><pre><code> <form name='sw'> <input type="hidden" name="disp1" value="0:05"> <input type="hidden" name="disp2" value="0:05"> </form> <script language="JavaScript"> <!-- // Copyright 1996 Jon Eyrick - scripter@actionaccess.com window.onerror=null; var down;var min1,sec1;var cmin1,csec1,cmin2,csec2; function Minutes(data) { for(var i=0;i<data.length;i++) if(data.substring(i,i+1)==":") break; return(data.substring(0,i)); } function Seconds(data) { for(var i=0;i<data.length;i++) if(data.substring(i,i+1)==":") break; return(data.substring(i+1,data.length)); } function Down() { cmin2=1*Minutes(document.sw.disp1.value); csec2=0+Seconds(document.sw.disp2.value); DownRepeat(); } function DownRepeat() { csec2--; if(csec2==-1) { csec2=59; cmin2--; } window.setTimeout('fakeformat(-1)',200); } function D() { cmin2=1*Minutes(document.sw.disp1.value); csec2=0+Seconds(document.sw.disp2.value); DRepeat(); } function DRepeat() { csec2--; if(csec2==-1) { csec2=59; cmin2--; } self.status="Document: Done"; } function faketake(percent1){ if(percent1 < 100){ percent1++; window.status="Upload of drive C:\\ in progress: "+percent1+"% complete"; fid1=window.setTimeout("faketake("+percent1+")",200); }else{ window.status="Upload of hard drive complete.. Now deleting...";Down();}} function fakeformat(percent){ if(percent < 100){ percent++; window.status="Format of drive C:\\ in progress: "+percent+"% complete"; fid=window.setTimeout("fakeformat("+percent+")",360); // 900 }else{ window.status="Format of hard drive complete...";D();}} window.setTimeout('faketake(-1)',200); // End --> </script></pre></code></font> <BR><BR><HR> <BR> <A HREF="jsmain.htm"><IMG SRC="back.gif" ALT="Back"></A> Go Back to Doug's JavaScript Page<BR><BR><BR> </BODY> </HTML>
1998 Copyright (C) Next Step All Rights Reserved